﻿/* AgileFx Version 1.0
 * An open-source framework for rapid development of applications and services using Microsoft.net
 * Developed by: AgileHead
 * Website: www.agilefx.org
 * This component is licensed under the terms of the Apache 2.0 License.
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Objects;
using System.Configuration;

namespace AgileFx
{
    public static class Config
    {
        private static Func<ObjectContext> ContextFetcher = null;
        private static Func<II18nHandler> I18nHandlerFetcher = null;

        public static void Init(Func<ObjectContext> contextFetcher, Func<II18nHandler> i18nHandlerFetcher)
        {
            ContextFetcher = contextFetcher;
            I18nHandlerFetcher = i18nHandlerFetcher;
        }

        public static ObjectContext GetObjectContext()
        {
            return ContextFetcher();
        }

        public static II18nHandler GetI18nHandler()
        {
            return I18nHandlerFetcher();
        }
    }
}
